<script>
    $.post('{{ urlfor "InputDiagnosisController.Index" }}',{'kwd':getQueryVariable('kwd'), 'query_type':getQueryVariable('query_type')}, function(res){
       if(res.code == 0) {
           if(res.data.length <= 0) {
               return false;
           }
           var tr_list = [];
           $.each(res.data, function(key, value) {
               tr_list.push('<tr><td class="name">'+ value.content +'</td><td>'+ value.pinyin +'</td><tr>');
           });
           $('#show_tr').html(tr_list.join(''));
       }
    });
    $('.am-table').on('dblclick', 'tbody > tr', function(){
        var title = $(this).find('.name').html();
        if(typeof parent.presc_diagnosis_callback == 'function') {
            parent.presc_diagnosis_callback(title);
            closeInputQueryList();
        }
    })
</script>